<include file="Public:_header" />
<body>
<include file="Public:top" />
<div class="main-container" id="main-container">
<script type="text/javascript">
    try{ace.settings.check('main-container' , 'fixed')}catch(e){}
</script>
<div class="main-container-inner">
<a class="menu-toggler" id="menu-toggler" href="#">
    <span class="menu-text"></span>
</a>
<style type="text/css" media="screen">
.pricing-box-small{
    margin-right: 6px;
}    
</style>
<include file="Public:left" />
<div class="main-content">
    <div class="breadcrumbs" id="breadcrumbs">
        <script type="text/javascript">
            try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
        </script>
        <!-- <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="#">{$apps.title}</a>
            </li>

            <li>
                <a href="#">图文回复</a>
            </li>
            <li class="active">回复</li>
        </ul> -->

    </div>

    <div class="page-content">
        <div class="row">
            <div class="col-xs-12">
                <include file="bar" />
                <div class="widget-box">
                    <div class="widget-header header-color-blue">
                        <h5 class="bigger lighter">
                            <i class="icon-table"></i>新增图文信息
                        </h5>
                    </div>
                    <div class="widget-body">
                        <div class="widget-main">
                        <form class="form-horizontal" method="post" action="{:U('Member/News/update')}" role="form">
                        <input type="hidden" name="id" value="{$vo.id}">
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">标题</label>

                                <div class="col-sm-10">
                                    <input type="text" value="{$vo.title}" name="title" class="input-xxlarge" />
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">关键字</label>
                                <div class="col-sm-10">
                                    <input type="text" value="{$vo.keywords}" name="keywords" class="input-xxlarge" />
                                <span class="help-block">
                                    <span class="middle">多个关键字直接请用,隔开</span>
                                </span>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">图片</label>

                                <div class="col-sm-6">
                                   <div class="input-group">
                                    <input type="text" value="{$vo.picurl}" name="picurl" class="input-large form-control" />
                                    <span to="picurl" class="input-group-addon upfile">
                                        <i class="icon-upload-alt"></i>
                                    </span>
                                    </div>
                                <span class="help-block">
                                    <span class="middle">显示的封面图片,尺寸建议在 200x200</span>
                                </span>
                                </div>
                            </div>

                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">网址</label>
                                <div class="col-sm-10">
                                    <input type="text" value="{$vo.url}" name="url" class="input-xxlarge" />
                                <span class="help-block">
                                    <span class="middle">如果填写网址则表示不会显示内容,直接跳转到此网址</span>
                                </span>
                                </div>
                            </div>

                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"></label>
                                <div class="col-sm-10">
                                    <include value="{$vo.desc|addslashes|filterueditor}" file="Public:ueditor" name="desc" />
                                
                                </div>
                            </div>


                            <div class="space-4"></div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">选项</label>
                                <div class="col-sm-2">
                                    <select class="form-control" data="{$vo.iswelcome}" name="iswelcome">
                                        <option value="0">选择</option>
                                        <option value="0">取消关注回复</option>
                                        <option value="1">设为关注回复</option>
                                    </select>
                                </div>
                                
                                <div class="col-sm-2">
                                    <select data="{$vo.ishelp}" name="ishelp" class="form-control">
                                        <option value="0">选择</option>
                                        <option value="0">取消自动回复</option>
                                        <option value="1">设为自动回复</option>
                                    </select>
                                </div>
                                <div class="col-sm-2">
                                    <select name="top" data="{$vo.top}" class="form-control">
                                        <option value="0">取消置顶/置底</option>
                                        <optgroup label="局部置顶">
                                        <option value="1">1</option>
                                        <option value="2">2</option>
                                        <option value="3">3</option>
                                        <option value="4">4</option>
                                        <option value="5">5</option>
                                        <optgroup label="全局置顶">
                                        <option value="11">11</option>
                                        <option value="12">12</option>
                                        <option value="13">13</option>
                                        <option value="14">14</option>
                                        <option value="15">15</option>
                                        <optgroup label="局部置底">
                                        <option value="21">21</option>
                                        <option value="22">22</option>
                                        <option value="23">23</option>
                                        <option value="24">24</option>
                                        <option value="25">25</option>
                                        <optgroup label="全局置底">
                                        <option value="31">31</option>
                                        <option value="32">32</option>
                                        <option value="33">33</option>
                                        <option value="34">34</option>
                                        <option value="35">35</option>
                                    </select>
                                </div>
                            </div>
                            <hr />
                            <div class="space-4"></div>
                            <volist name="tpllist" id="tpl">
                            <div class="pricing-span">
                                <div class="widget-box pricing-box-small">
                                    <div class="widget-header tplpreview header-color-grey tpl_{$tpl.tplname}">
                                        <h5 class="bigger lighter">{$tpl.tplname}</h5>
                                    </div>
                                    <div class="widget-body">
                                        <div class="widget-main no-padding">
                                            <img width="100%" height="200px;" src="{$tpl.preview}">
                                        </div>
                                        <div>
                                            <button type="button" tpl="{$tpl.tplname}" class="cktpl btn btn-block btn-default">
                                            <i class="icon-ok"></i>
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            </volist>
                            <div class="clearfix"></div>
                            <hr />
                            <input type="hidden" name="tpl" value="{$vo.tpl}">
                            <button class="btn btn-info" type="submit">
                            <i class="icon-ok bigger-110"></i>保存</button>
                        </form>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<include file="Public:settings" />
</div>

</div>
<include file="Public:footer" />

<script type="text/javascript">
$(function(){
    var tplname = $('input[name=tpl]').val();
    if (tplname == "") tplname = 'default';
    $('.tpl_'+tplname).removeClass('header-color-grey');
    $('button[tpl='+tplname+']').addClass('btn-danger');
    $('.tpl_'+tplname).addClass('header-color-red');
    $('.cktpl').on('click',function(){
        //tpl_
        tplname = $(this).attr('tpl');
        $('.tplpreview').removeClass('header-color-red');
        $('.tpl_'+tplname).removeClass('header-color-grey');
        $('.tpl_'+tplname).addClass('header-color-red');
        $('.cktpl').removeClass('btn-danger');
        $(this).addClass('btn-danger');
        $('input[name=tpl]').val(tplname);
    })
})    
</script>
</body>
</html>
